package com.wuzuqing.android.eightdiagrams.hook.testHookers;

import android.net.wifi.WifiManager;
import android.util.Log;

import com.swift.sandhook.annotation.HookClass;
import com.swift.sandhook.annotation.HookMethod;
import com.swift.sandhook.annotation.HookMethodBackup;
import com.swift.sandhook.annotation.ThisObject;
import com.swift.sandhook.wrapper.HookWrapper;

@HookClass(WifiManager.class)
public class WifiManagerHooker {


    @HookMethodBackup("getConnectionInfo")
    static HookWrapper.HookEntity onPauseBackup;


    @HookMethod("getConnectionInfo")
    public static void getIpAddress(@ThisObject WifiManager thiz) throws Throwable {
        Log.e("WifiManagerHooker", "hooked getIpAddress success " + thiz);
        onPauseBackup.callOrigin(thiz);
    }

}
